package org.asiainfo.file.service;

import org.asiainfo.common.mybatis.stream.core.page.TableDataInfo;
import org.asiainfo.common.mybatis.stream.core.page.PageQuery;

import java.util.Collection;
import java.util.List;

import org.asiainfo.file.domain.AttactmentInfo;
import org.asiainfo.file.domain.vo.AttactmentInfoVo;
import org.asiainfo.file.domain.bo.AttactmentInfoBo;
import com.mybatisflex.core.service.IService;
import org.springframework.web.multipart.MultipartFile;

/**
 * 附件文件详细信息Service接口
 *
 * @author dotor-ww
 */
public interface AttactmentInfoService extends IService<AttactmentInfo> {

    /**
     * 通过attactmentInfoId查询单条数据
     *
     * @param attactmentInfoId 主键
     * @return 实例对象
     */
    AttactmentInfoVo queryById(Long attactmentInfoId);

    /**
     * 查询
     *
     * @param attactmentInfoBo 筛选条件
     * @return 查询结果
     */
    List<AttactmentInfoVo> queryList(AttactmentInfoBo attactmentInfoBo);

    /**
     * 分页查询
     *
     * @param attactmentInfoBo 筛选条件
     * @param pageQuery        分页对象
     * @return 查询结果
     */
    TableDataInfo<AttactmentInfoVo> queryPageList(AttactmentInfoBo attactmentInfoBo, PageQuery pageQuery);

    /**
     * 新增数据
     *
     * @param attactmentInfoBo 实例对象
     * @return 实例对象
     */
    Boolean insertByBo(AttactmentInfoBo attactmentInfoBo);

    /**
     * 修改数据
     *
     * @param attactmentInfoBo 实例对象
     */
    Boolean updateByBo(AttactmentInfoBo attactmentInfoBo);

    /**
     * 通过主键删除数据
     *
     * @param attactmentInfoIds 主键
     */
    Boolean deleteWithValidByIds(Collection<Long> attactmentInfoIds);

    /**
     * 构建附件详细信息
     *
     * @param attactmentId 附件ID
     * @param fileUrl      文件URL
     * @param file         文件
     * @return 构建结果
     */
    AttactmentInfo buildAttactmentInfo(Long attactmentId, String fileUrl, MultipartFile file);
}
